<template>
  <div class="base-panels bgWhite">
    <h2 class="title2">主要人员</h2>
    <Row type="flex">
      <Col v-for="item in recordDetail">
        <div class="t_list">
          <p class="t_tl">{{item.compPositionData}}</p>
          <p>{{item.cmName}}</p>
          <p>{{ item.cmIdno }}</p>
        </div>
      </Col>
    </Row>
  </div>
</template>
<script lang="ts">
import {defineComponent, inject, onMounted, ref } from 'vue';
import {Row, Col, Table, Input, Select, Button, Modal, Descriptions,} from 'ant-design-vue';
import { getstaffApi  } from '/@/api/foreign';
import { parseTime } from '/@/utils';

interface model {
  cmIdno?: string;
  cmName?: string;
  cmStaffId?: string;
  compManagerId?: string;
  compPosition?: string;
  compPositionData?: string;
}

export default defineComponent({
  components: {
    Table , Row, Col, Input, Button, Select, Option: Select.Option,
    Modal,Descriptions,DescriptionsItem:Descriptions.Item,
  },
  setup() {
    const corpId = inject('corpId') as string;
    const recordDetail = ref<model[]>()
    const changeHandler = () => {
      getstaffApi( { corpId }).then( ({success,data}) => {
        if(success){
          recordDetail.value =data
        }
      })
    }

    onMounted(changeHandler)

    return {
      changeHandler ,recordDetail , parseTime
    }
  },
})
</script>

<style lang="less" scoped>

.base-panels{
  padding: 20px;
}

.t_list{
  width: 376px;
  padding: 18px;
  margin-right: 6px;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  background: #F3F3F3;

  .t_tl {
    font-size: 16px;
    font-weight: 600;
  }

    p {
    height: 22px;
    margin: 5px 0;
  }
}
</style>

